package work.atpgroup.mapper;

import org.springframework.stereotype.Component;
import work.atpgroup.entity.ResourceLink;

import java.util.List;
@Component("resourceLinkMapper")
public interface ResourceLinkMapper {
    ResourceLink getResourceLinkById(Integer id);
    ResourceLink getResourceLinkByPath(String resourcepath);
    List<ResourceLink> getResourceLinkByUserId(Integer userId);
    List<ResourceLink> getResourceLinkByUserIdAndDateAsc(Integer userId);
    List<ResourceLink> getResourceLinkByUserIdAndDateDesc(Integer userId);
    int insertResourceLink(ResourceLink resourceLink);
    int updateResourceLink(ResourceLink resourceLink);
    int deleteResourceLinkById(Integer id);
    int deleteResourceLinkByUserId(Integer userId);
    String getResourceLinkPathById(Integer id);
    int getResourceLinkIdByPath(String path);
    List<String> getResourceLinkPathByUserId(Integer userId);
    List<String> getResourceLinkPathByUserIdAndDateAsc(Integer userId);
    List<String> getResourceLinkPathByUserIdAndDateDesc(Integer userId);
    Integer getUserIdByResourceId(Integer id);


}
